package com.benshou.bsoa.dto.yida.req;

import jakarta.validation.Valid;
import lombok.Data;
import lombok.NonNull;

@Data
public class YiDaReq {
    /**
     * 应用编码 (Application Code).
     * This is a required field.
     */
    private String appType;

    /**
     * 应用秘钥 (Application Secret).
     * This is a required field.
     */
    private String systemToken;

    /**
     * 用户的userid (User ID).
     * This is a required field.
     */
    @NonNull
    private String userId;

    /**
     * 语言 (Language).
     * Optional field with possible values:
     * - zh_CN: Chinese (default)
     * - en_US: English
     */
    private String language;

    /**
     * 表单ID (Form UUID).
     * This is a required field.
     */
    private String formUuid;

    /**
     * 表单数据 (Form Data).
     * This is a required field.
     * Example: {"textField_jcpm6agt": "单行", "employeeField_jcos0sar": ["workno"]}
     * Key: Component identifier (viewable in the advanced settings of the YiDa form editor).
     * Value: Value inside the component.
     */
    private String formDataJson;

    /**
     * 是否使用组件别名 (Use Component Alias).
     * Optional field. If enabled, the `formDataJson` keys can use aliases for component IDs.
     */
    private Boolean useAlias;


    /*
     * 表单实例数据id
     */
    private String formInstanceId;


    /*
     * currentPage当前页码
     */
    private Integer currentPage;

    /*
     * pageSize每页条数
     */
    private Integer pageSize;

    public YiDaReq(String userId, String formUuid) {
        this.userId = userId;
        this.formUuid = formUuid;
    }
    public YiDaReq(){}
}
